<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    Function.prototype.bind = function (thisObj) {
      const f = this
      return function () {
        console.log('新函数', this)
        f.call(thisObj)
      }
    }
    const obj = {
      test () {
        console.log(this)
      }
    }
    const o = {m: 1}
    obj.test.bind(o)()
  </script>
</body>
</html>